module.exports = {
    configureWebpack(config) {
        console.log(config.devtool)
        config.devtool = 'source-map'
        config.output.filename = () => '[name].js'
        config.output.chunkFilename = '[name].js'
    },
    pages: {
        popup: {
            template: 'public/index.html',
            entry: './src/popup/main.js',
        }
    },
    productionSourceMap: false,
    filenameHashing: false,
    css: {
        extract: false,
    },
    pluginOptions: {
        browserExtension: {
            componentOptions: {
                background: {
                    entry: './src/javascript/background.js'
                },
                contentScripts: {
                    entries: {
                        'content-script': [
                            'src/content-scripts/main.js'
                        ]
                    },
                },
            },
            manifestTransformer: (manifest) => {
                delete manifest.content_security_policy
                return manifest
            },
            extensionReloaderOptions: {
                reloadPage: false,
            }
        },
    },

}
